<!DOCTYPE html>
<html>
<head>
	<title>育婴师</title>
	<meta charset="utf-8">
	<link rel="stylesheet" type="text/css" href="/layui/css/layui.css"  media="all">
	<link rel="stylesheet" type="text/css" href="css/front/careBaby.css">
	
	<link href="http://www.51baomu.cn/baike/css/style.css" rel="stylesheet" type="text/css" />
	<link rel='stylesheet' href='http://www.51baomu.cn/css_new/newUc.css' />
	<link rel='stylesheet' href='http://www.51baomu.cn/css_new/2017/seo.css' />

	<script src="/jquery/jquery.min.js"></script>

	<script type="text/javascript" src="/layui/layui.js"></script>
	<script type="text/javascript" src="js/Popt.js"></script>
	<script type="text/javascript" src="js/city.json.js"></script>
	<script type="text/javascript" src="js/citySet.js"></script>

	
</head>

<body>

<% include("/templates/common/nav.html"){} %>


<div class="wrap">

	<div class="wiki-bg pb10 pt10 " style="margin-top: 60px;">
		<div class="condition" >
			<input class="city-input" name="" id="city" type="text" placeholder="请选择城市地区" autocomplete="off" readonly="true">

			<input class="hometown-input" name="" id="hometown" type="text" placeholder="请选择育婴师籍贯" autocomplete="off" readonly="true">


    		<div class="selemediv1"> <div class="selemenu" id="organization" value="${orgId}">
				<%
				var flag=0;
				for(org in orgs!){
					if(org.id==orgId){
						flag=1;
				%>
					${org.name}
				<%
					}
				}
				%>
				<%
					if(flag!=1){
				%>
					请选择机构
				<%
					}
				%>
			</div>
                            <DIV class="citylist" >
								<%
								for(org in orgs!){
								%>
								 <span value="${org.id}">${org.name}</span>
								<%
								}
								%>
                            </div>
    		</div>
   			<div class="selemediv2"> <div class="selemenu" id="level" value="${levelId}">

				<%
				flag=0;
				for(level in levels!){
				if(level.value==levelId){
					flag=1;
				%>
					${level.desc}
				<%
				}
				}
				%>
				<%
				if(flag!=1){
				%>
					请选择育婴师等级
				<%
				}
				%>
			</div>
                            <DIV class="citylist">
								<%
								for(level in levels!){
								%>
								<span value="${level.value}">${level.desc}</span>
								<%
								}
								%>
                            </div>
    		</div>
    		<div class="selemediv3"> <div class="selemenu" id="diploma" value="${educationId}">
				<%
				flag=0;
				for(education in educations!){
					if(education.value==educationId){
						flag=1;
				%>
						${education.desc}
				<%
					}
				}
				%>
				<%
				if(flag!=1){
				%>
				请选择学历
				<%
				}
				%>

			</div>
                            <DIV class="citylist">
								<%
								for(education in educations!){
								%>
								<span value="${education.value}">${education.desc}</span>
								<%
								}
								%>
                            </div>
    		</div>

    		<div class="selemediv4"> <div class="selemenu" id="experience" value="${experience}">${experience =="" ? "请选择经验" : experience=="0/1"?"1年以下":experience=="1/3"?"1到3年":experience=="3/5"?"3到5年":experience=="5"?"5年以上":"请选择经验"}</div>
                            <DIV class="citylist">
								 <span value="0/1">1年以下</span>
								 <span value="1/3">1到3年</span>
								 <span value="3/5">3到5年</span>
								 <span value="5">5年以上</span>
                            </div>
    		</div>
   			<div class="selemediv5"> <div class="selemenu" id="age" value="${age}">${age == "" ? "请选择年龄" : age=="0/20" ? "20以下": age=="20/29" ? "20到29":age=="30/39" ?"30到39" :age=="40/49"? "40到49":age=="50"? "50以上":"请选择年龄" }</div>
                            <DIV class="citylist">
                             <span value="0/20">20以下</span>
                             <span value="20/29">20到29</span>
                             <span value="30/39">30到39</span>
                             <span value="40/49">40到49</span>
                             <span value="50">50以上</span>
                            </div>
    		</div>
    		<div class="selemediv6"> <div class="selemenu" id="salary" value="${salary}">${salary=="" ?"请选择工资" : salary=="0/3000"? "0-3000" :salary=="3000/6000"? "3000-6000": salary=="6000-10000"?"6000到10000":salary=="10000"? "10000以上":"请选择工资"}</div>
                            <DIV class="citylist">
                             <span value="0/3000">0-3000</span>
                             <span value="3000/6000">3000-6000</span>
                             <span value="6000/10000">6000-10000</span>
                             <span value="10000">10000以上</span>
                            </div>
    		</div>

    		<button class="layui-btn layui-btn-normal search-btn" onclick="search();">🔍寻找育婴师</button>
		</div>
	</div>

	<div class="result" style="width: 1150px; height: 1100px; border: 2px solid #b5b9bc; margin: auto; padding: 20px;">
		<%
		for(worker in workers!){
		%>
			<div class="person">
				<label class="label-address">➤${worker.address!}</label>
				<div src="" class="photo"><img src="${worker.image!}" class="photo-icon" onclick="individualInfo('${worker.id}');"></div>
				<label class="label-salary">起薪:${worker.startSalary!},合同期间${worker.perSalary!}/天</label>
				<div class="label-age">
					<label>${worker.age!}岁</label>
					<label>${worker.education.desc!}</label>
					<label>${worker.nativePlace!}</label>
				</div>
			</div>
		<%
		}
		%>
		<!--<div class="person">-->
			<!--<label class="label-address">➤现住地址</label>-->
			<!--<label class="label-id">工号</label>-->
			<!--<div src="" class="photo"><img src="img/icon.jpg" class="photo-icon"></div>-->
			<!--<label class="label-salary">工资</label>-->
			<!--<label class="label-age">年龄</label>-->
			<!--<label class="label-diploma">学历</label>-->
			<!--<label class="label-hometown">籍贯</label>-->
		<!--</div>-->


		<div class="pages">
			<div id="demo2" style="display: inline-block; width: 800px; margin-left: 250px;"></div>
		</div>
		
	</div>



	</div>

	<script type="text/javascript">
		layui.use(['laypage', 'layer'], function(){
			var laypage = layui.laypage;

			laypage.render({
				elem: 'demo2'
				,theme: '#1E9FFF'
                ,limit:15
                ,count:"${count}" //数据总数，从服务端得到
                ,curr:"${curr}"
                ,jump: function(obj, first){
                    //首次不执行
                    if(!first){
                        //do something
                        //obj包含了当前分页的所有参数，比如：
                        console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。
                        console.log(obj.limit); //得到每页显示的条数
                        window.location.href="/careBaby.html?curr="+obj.curr+"&limit="+obj.limit+"&city=${city}&hometown=${hometown}&orgId=${orgId}&levelId=${levelId}&education=${educationId}&experience=${experience}&age=${age}&salary=${salary}";

                    }
                }
			});
	});
	</script>

	<script type="text/javascript">
		function individualInfo(workId) {
			window.location.href="/individualInfo.html?workerId="+workId;
        }
    	function search() {
    		var city = document.getElementById("city").value;
    		var hometown = document.getElementById("hometown").value;
            var organization = $("#organization").attr("value");
            var level = $("#level").attr("value");
            var diploma = $("#diploma").attr("value");
            var experience = $("#experience").attr("value");
            var age = $("#age").attr("value");
            var salary = $("#salary").attr("value");
            city=(city===undefined?"":city);
            hometown=(hometown===undefined?"":hometown);
            organization=(organization===undefined?"":organization);
            level=(level===undefined?"":level);
            diploma=(diploma===undefined?"":diploma);
            age=(age===undefined?"":age);
            salary=(salary===undefined?"":salary);
            experience=(experience===undefined?"":experience);

//            alert(city +" " +hometown+" "+level+" "+diploma +" "+ experience+" "+age+" "+salary);
            window.location.href="/careBaby.html?city="+city+"&hometown="+hometown+"&orgId="+organization+"&levelId="+level+"&education="+diploma+"&experience="+experience+"&age="+age+"&salary="+salary;
    	}
    </script>

	<script type="text/javascript">
    	$("#city").click(function (e) {
    		SelCity(this,e);
    	});
    	$("#hometown").click(function (e) {
    		SelCity(this,e);
    	});
    	$("s").click(function (e) {
    		SelCity(document.getElementById("city"),e);
    	});
    </script>

    <script>
    	$(".selemenu").click(function(){
    		$(this).next().slideToggle();
    		$(this).parents().siblings().find(".citylist").slideUp();
    	})

    	$(".citylist span").click(function(){
    		var text=$(this).text();
            var value=$(this).attr("value");
            $(this).parent().prev().html(text);
            $(this).parent().prev().attr("value",value);
    		$(this).parent().prev().css("color","#666")
    		$(this).parent().fadeOut();

    	})

    	$(function(){
    		$(document).not($(".selemediv1")).click(function(){
    			$(".citylist").slideUp();
    		})
    		$(".selemediv1").click(function(event){
    			event.stopPropagation();
    		})
    		$(document).not($(".selemediv2")).click(function(){
    			$(".citylist").slideUp();
    		})
    		$(".selemediv2").click(function(event){
    			event.stopPropagation();
    		})
    		$(document).not($(".selemediv3")).click(function(){
    			$(".citylist").slideUp();
    		})
    		$(".selemediv3").click(function(event){
    			event.stopPropagation();
    		})
    		$(document).not($(".selemediv4")).click(function(){
    			$(".citylist").slideUp();
    		})
    		$(".selemediv4").click(function(event){
    			event.stopPropagation();
    		})
    		$(document).not($(".selemediv5")).click(function(){
    			$(".citylist").slideUp();
    		})
    		$(".selemediv5").click(function(event){
    			event.stopPropagation();
    		})
    		$(document).not($(".selemediv6")).click(function(){
    			$(".citylist").slideUp();
    		})
    		$(".selemediv6").click(function(event){
    			event.stopPropagation();
    		})
    	})
    </script>

	<div style="width: 100%; margin-top: 0px; position: absolute; height: 70px; background-color: #3399FF; color: white; font-size: 15px; text-align: center;">
		<p style="font-size: 20px; margin-top: 30px;">Copyright ©2018-2019【母婴系统】 华迪有限公司 | 川ICP备号-3 | 川公网安备 11011502019527</p>
	</div>

</body>
</html>